/*
 * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package top.continew.admin.asset.model.req;

import jakarta.validation.constraints.*;

import lombok.Data;

import io.swagger.v3.oas.annotations.media.Schema;

import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;
import java.time.*;

/**
 * 创建或修改设备履历参数
 *
 * @author CharlieYan
 * @since 2025/03/28 15:13
 */
@Data
@Schema(description = "创建或修改设备履历参数")
public class DeviceTracksReq implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 设备Id
     */
    @Schema(description = "设备Id")
    @NotNull(message = "设备Id不能为空")
    private Long deviceId;

    /**
     * 操作时间
     */
    @Schema(description = "操作时间")
    @NotNull(message = "操作时间不能为空")
    private LocalDateTime carryTime;

    /**
     * 操作名称
     */
    @Schema(description = "操作名称")
    @NotBlank(message = "操作名称不能为空")
    @Length(max = 50, message = "操作名称长度不能超过 {max} 个字符")
    private String carryName;

    /**
     * 操作人Id
     */
    @Schema(description = "操作人Id")
    @NotNull(message = "操作人Id不能为空")
    private Long userId;

    /**
     * 操作内容
     */
    @Schema(description = "操作内容")
    @Length(max = 500, message = "操作内容长度不能超过 {max} 个字符")
    private String content;
}